//
//  LZUploadImagePresenter.h
//  laziz_Consumer
//
//  Created by xbn_iMac on 2016/11/29.
//  Copyright © 2016年 XBN. All rights reserved.
//

#import "LZBasePresenter.h"
#import "NetworkServiceManager.h"

//typedef void (^ UploadRequestSuccessBlock)(NSURLSessionDataTask *task, id responseObject);
//typedef void (^ UploadRequestFailureBlock)(NSURLSessionDataTask *task, NSError *error);
typedef void (^ UploadRequestConstructingBodyBlock)(id<AFMultipartFormData> formData);

@interface LZUploadImagePresenter : LZBasePresenter


/**
 业务类型
 USER_HEAD_IMG          必填	1：用户头像
 SELLER_HEAD_IMG        必填	2：商户头像
 PROMOTION_VIDEO        必填	3：优惠视频
 RESTAURANT_HEAD_IMG	必填	4：餐厅头图
 RESTAURANT_IMG	byte	必填	5：餐厅相册
 VIDEO_COMMENT_IMG      必填	6：视频评论图片
 RESTAURANT_COMMENT_IMG 必填	7：餐厅评论图片
 SELLER_BUSINESS_IMG	必填	8：商户营业执照
 VIDEO_IMG              必填	9：视频截图
 */

/**
 上传图片
 
 @param imageFile 图片
 @param businessId 业务ID,如果上传头像就是用户ID
 @param businessType 业务类型，看上面。
 @param businessNo 图片的序号
 @param isThumb 不缩放传NO；缩放传YES
 @param aSize 可为空，默认{200，200}，空时传CGSizeZero
 
 */

- (id)uploadImage:(UIImage *)imageFile
        andBusinessId:(NSString*)businessId
      andBusinessType:(NSString*)businessType
        andBusinessNo:(NSString*)businessNo
           andIsThumb:(BOOL)isThumb
              andSize:(CGSize)aSize
     andonSuccess:(PresenterCommonSuccess)success
           onFail:(PresenterCommonFail)fail;

//             andBlock:(void(^)(id data, NSError *error))block;

- (id)uploadVideoPath:(NSString *)videoPath
        andBusinessId:(NSString *)businessId
      andBusinessType:(NSString *)businessType
        andBusinessNo:(NSString *)businessNo
         andonSuccess:(PresenterCommonSuccess)success
               onFail:(PresenterCommonFail)fail;
//             andBlock:(void (^)(id, NSError *))block;

@end
